Change way alpha is used when recoloring symbolics
authorAlexander Larsson <alexl@redhat.com>
Tue, 12 Aug 2014 07:17:59 +0000 (09:17 +0200)
committerAlexander Larsson <alexl@redhat.com>
Tue, 12 Aug 2014 13:51:36 +0000 (15:51 +0200)
commitafeb50009dc6268a94d88f18340bd192897a0fbb
tree95d7415372bc2f8614cef14c9bfe63200b79a1ca
parent928822f1a5f2e5302c9bc5cfe98f5960e97d61de
Change way alpha is used when recoloring symbolics

If the foreground color has an alpha != 1 we used to just pass that into
the svg. This is useful to e.g. render an insensitive icon. However,
that is not an ideal model for symbolics. For instance, if the icon uses
overlapping areas when drawing, expecting these to be opaque then the
transparent color will result in a different alpha value for the overlapping
area. Also, non-foreground symbolic colors are still rendered opaque, and
the recoloring of pngs can't handle transparent colors.

So, instead we extract any alpha from the foreground, render using the
opaque colors and then apply the foreground alpha to the entire result.
This means we get an even transparency, even for other colors, and we
can apply alpha for the pngs too.

https://bugzilla.gnome.org/show_bug.cgi?id=734668
gtk/gtkicontheme.c